package experiment_forth;

public class Test {

	public static void main(String[] args) {
		// TODO 自动生成的方法存根
		Lab_information r1 = new Lab_information("计算机网络实验室");
		Lab_information r2 = new Lab_information("计算机组成原理实验室");
		Lab_information r3 = new Lab_information("北石化仿人机器人实验室");
		Lab_information r4 = new Lab_information("偏振光实验室");
		People p1 = new Student("张三", 0, r1, r2);
		People p2 = new Student("李四", 0, r3, r4);
		System.out.println("学生信息:");
		System.out.println(p1);
		System.out.println(p2);
		r1.setLevel("优秀");
		r2.setLevel("及格");
		r3.setLevel("不及格");
		r4.setLevel("及格");
		System.out.println("教师信息:");
		System.out.println(r1);
		System.out.println(r2);
		System.out.println(r3);
		System.out.println(r4);
		System.out.println("张三等级为"+r1.level+p1.lab1);
		System.out.println("张三等级为"+r2.level+p1.lab2);
		System.out.println("李四等级为"+r3.level+p2.lab1);
		System.out.println("李四等级为"+r4.level+p2.lab2);
		try {
			double result1 = Tran.sum(700, 600);
			System.out.println("张三一周收入为:"+result1);
			p1.salary = result1;
			p1.salary = p1.salary*5;
			double result2 = Tran.sum(600,500);
			System.out.println("李四一周的输入为:"+result2);
			p2.salary = result2;
			p2.salary = p2.salary*5;
			System.out.println("张三的总收入:"+p1.salary);
			System.out.println("李四的总收入:"+p2.salary);
			double result3 = Tran.avg(p1.salary);
			System.out.println("张三税后的收入为:"+result3);
			double result4 = Tran.avg(p2.salary);
			System.out.println("李四税后的收入为:"+result4);
		} catch (MyException e) {
			System.out.println(e);
		}
		System.out.println("program over");
	}
	
}
